<?php
   $xslDoc = new DOMDocument();
   $xslDoc->load("xml/menu.xsl");

   $xmlDoc = new DOMDocument();
   $xmlDoc->load("xml/menu.xml");

   $proc = new XSLTProcessor();
   $proc->importStylesheet($xslDoc);
   $proc->setParameter('', 'niveau',$niveau);
   echo $proc->transformToXML($xmlDoc);
?>